<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>循环语句</title>

    <script>
        var person = {
            name:"zhangsan",
            age:20
        }

        //for each
        for (a in person) {
            console.log(a)
            console.log(person[a])
        }

        //while
        var a = 10
        while (a > 0) {
            console.log(a)
            a--
        }

        //for
        // for (var i=5; i>0; i--) {
        //     console.log(i)
        // }

        console.log("======================")
        var b = 5
        do {
            console.log(b)
            b++
        } while (b < 10)
        
        
        
        


    </script>

</head>
<body>

</body>
</html>